import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'

Vue.use(Vuex)

export default new Vuex.Store({
    plugins: [createPersistedState()], // 缓存state
	state: {
		token: '', // 设置token
		selTeam: '',
		reportDateType: '',
		iosType: ''
	},
	mutations: {
		setToken (state, token) {
			state.token = token
		},
		setSelTeam (state, selTeam) {
            state.selTeam = selTeam
		},
        setReportDateType (state, reportDateType) {
            state.reportDateType = reportDateType
        },
        setIosType (state, iosType) {
            state.iosType = iosType
        }
	},
	actions: {},
	modules: {}
})
